#ifndef __StarPollUtil_H__
#define __StarPollUtil_H__

#include "cocos2d.h"
#include "entity/Entity/Star/Star.h"
#include <queue>

USING_NS_CC;

class StarPollUtil : public CCObject{
public:
	StarPollUtil();
	~StarPollUtil();

	static StarPollUtil* shareStarPollUtil();

	Star* popStarAndBegin();

	void pushStarAndStop(Star* star);

private:
	void pushStar(Star* star);

	Star* popStar();

	CREATE_FUNC(StarPollUtil);
	virtual bool init();

	static StarPollUtil* m_starPollUtil;

private:
	int m_starNum;

	CCArray* m_allStar;

	std::queue<Star*> m_queue;
};
#endif // !__StarPollUtil_H__
